package com.kashow.bean.user.buyed;

import android.text.TextUtils;

import com.kashow.C;
import com.kashow.bean.BaseBean;

import java.util.List;

/**
 * Created by yybs on 16/11/3.
 */

public class BuyedLive extends BaseBean {

    /**
     * _id : 580efb04e778521dd99c5687
     * createdAt : 2016-10-25 02:26:12
     * fee : 1
     * live : {"_id":19,"a_stream":["http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fr9mrV9DkFCCrTO0ShcPa0iZNJUl","http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fr9mrV9DkFCCrTO0ShcPa0iZNJUl","http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fj0uSBgsO5taziJL5kgU79b7py7o","http://qiniu.kashowvr.com/undefined"],"a_watch":42,"category":5,"createdAt":"2016-10-25T05:59:16.375Z","desc":"技术解决大数据分析","livePic":"http://oss.kashowvr.com/wx/upload/media/aIVnIyjXG6IGzSe21OufucKjvMxSsh7Lv616Y5ayiNDpSkvnOfaUTVvOzAbkX8of.jpeg","liveSharePic":"http://oss.kashowvr.com/wx/upload/media/aIVnIyjXG6IGzSe21OufucKjvMxSsh7Lv616Y5ayiNDpSkvnOfaUTVvOzAbkX8of.jpeg","persistentId":"z1.582e93d98a3c0c5edcda053f","playUrl":"http://pili-live-hls.kashowvr.com/kashowvr/teststream.m3u8","priority":1,"score":0.01,"startAt":"2016-10-26T05:58:00.000Z","status":3,"stream":"z1.kashowvr.teststream","teacher":{"__v":0,"_id":4,"balance":0,"createdAt":"2016-10-24T05:47:12.714Z","isSub":true,"isTeacher":true,"level":1,"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","phone":"15121013068","relation":2,"score":0,"sex":0,"wxUserInfo":{"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","nickname":"逆风飞行","sex":1,"city":"east","province":"Tianjin","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0","updatedAt":"2016-10-24T05:47:12.000Z"}},"title":"it大数据","watch":228}
     * openid : ohHipv6XJGwrDTVEQSjqjh3PmhKY
     * orderId : 67
     * payWay : 1
     * score : 0.01
     * status : 1
     * updatedAt : 2016-10-25 02:27:26
     * id : 580efb04e778521dd99c5687
     */

    private String _id;
    private String createdAt;
    private int fee;
    private LiveBean live;
    private String openid;
    private int orderId;
    private int payWay;
    private double score;
    private int status;
    private String updatedAt;
    private String id;
    /**
     * buyed : true
     */




    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public int getFee() {
        return fee;
    }

    public void setFee(int fee) {
        this.fee = fee;
    }

    public LiveBean getLive() {
        return live;
    }

    public void setLive(LiveBean live) {
        this.live = live;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getPayWay() {
        return payWay;
    }

    public void setPayWay(int payWay) {
        this.payWay = payWay;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(String updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public static class LiveBean {
        /**
         * _id : 19
         * a_stream : ["http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fr9mrV9DkFCCrTO0ShcPa0iZNJUl","http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fr9mrV9DkFCCrTO0ShcPa0iZNJUl","http://qiniu.kashowvr.com/ztCQ3TmMxCkBpuHyGHOlTSmty0Y=/Fj0uSBgsO5taziJL5kgU79b7py7o","http://qiniu.kashowvr.com/undefined"]
         * a_watch : 42
         * category : 5
         * createdAt : 2016-10-25T05:59:16.375Z
         * desc : 技术解决大数据分析
         * livePic : http://oss.kashowvr.com/wx/upload/media/aIVnIyjXG6IGzSe21OufucKjvMxSsh7Lv616Y5ayiNDpSkvnOfaUTVvOzAbkX8of.jpeg
         * liveSharePic : http://oss.kashowvr.com/wx/upload/media/aIVnIyjXG6IGzSe21OufucKjvMxSsh7Lv616Y5ayiNDpSkvnOfaUTVvOzAbkX8of.jpeg
         * persistentId : z1.582e93d98a3c0c5edcda053f
         * playUrl : http://pili-live-hls.kashowvr.com/kashowvr/teststream.m3u8
         * priority : 1
         * score : 0.01
         * startAt : 2016-10-26T05:58:00.000Z
         * status : 3
         * stream : z1.kashowvr.teststream
         * teacher : {"__v":0,"_id":4,"balance":0,"createdAt":"2016-10-24T05:47:12.714Z","isSub":true,"isTeacher":true,"level":1,"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","phone":"15121013068","relation":2,"score":0,"sex":0,"wxUserInfo":{"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","nickname":"逆风飞行","sex":1,"city":"east","province":"Tianjin","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0","updatedAt":"2016-10-24T05:47:12.000Z"}}
         * title : it大数据
         * watch : 228
         */

        private int _id;
        private int a_watch;
        private int category;
        private String createdAt;
        private String desc;
        private String livePic;
        private String liveSharePic;
        private String persistentId;
        private String playUrl;
        private int priority;
        private double score;
        private String startAt;
        private int status;
        private String stream;
        private TeacherBean teacher;
        private String title;
        private boolean buyed;

        public boolean isBuyed() {
            return buyed;
        }

        public void setBuyed(boolean buyed) {
            this.buyed = buyed;
        }

        private int watch;
        private List<String> a_stream;

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }

        public int getA_watch() {
            return a_watch;
        }

        public void setA_watch(int a_watch) {
            this.a_watch = a_watch;
        }

        public int getCategory() {
            return category;
        }

        public void setCategory(int category) {
            this.category = category;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getLivePic() {
            return livePic;
        }

        public void setLivePic(String livePic) {
            this.livePic = livePic;
        }

        public String getLiveSharePic() {
            return liveSharePic;
        }

        public void setLiveSharePic(String liveSharePic) {
            this.liveSharePic = liveSharePic;
        }

        public String getPersistentId() {
            return persistentId;
        }

        public void setPersistentId(String persistentId) {
            this.persistentId = persistentId;
        }

        public String getPlayUrl() {
            return playUrl;
        }

        public void setPlayUrl(String playUrl) {
            this.playUrl = playUrl;
        }

        public int getPriority() {
            return priority;
        }

        public void setPriority(int priority) {
            this.priority = priority;
        }

        public double getScore() {
            return score;
        }

        public void setScore(double score) {
            this.score = score;
        }

        public String getStartAt() {
            return startAt;
        }

        public void setStartAt(String startAt) {
            this.startAt = startAt;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getStream() {
            return stream;
        }

        public void setStream(String stream) {
            this.stream = stream;
        }

        public TeacherBean getTeacher() {
            return teacher;
        }

        public void setTeacher(TeacherBean teacher) {
            this.teacher = teacher;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getWatch() {
            return watch;
        }

        public void setWatch(int watch) {
            this.watch = watch;
        }

        public List<String> getA_stream() {
            return a_stream;
        }

        public void setA_stream(List<String> a_stream) {
            this.a_stream = a_stream;
        }

        public static class TeacherBean {
            /**
             * __v : 0
             * _id : 4
             * balance : 0
             * createdAt : 2016-10-24T05:47:12.714Z
             * isSub : true
             * isTeacher : true
             * level : 1
             * openid : ohHipvzbJn7nBhTdLFJv80PQV5N0
             * phone : 15121013068
             * relation : 2
             * score : 0
             * sex : 0
             * wxUserInfo : {"openid":"ohHipvzbJn7nBhTdLFJv80PQV5N0","nickname":"逆风飞行","sex":1,"city":"east","province":"Tianjin","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0","updatedAt":"2016-10-24T05:47:12.000Z"}
             */

            private int _id;
            private int balance;
            private String createdAt;
            private boolean isSub;
            private boolean isTeacher;
            private int level;
            private String openid;
            private String phone;
            private int relation;
            private int score;
            private int sex;
            private String nickname;
            private String headimgurl;
            private WxUserInfoBean wxUserInfo;

            public int get_id() {
                return _id;
            }

            public void set_id(int _id) {
                this._id = _id;
            }

            public int getBalance() {
                return balance;
            }

            public void setBalance(int balance) {
                this.balance = balance;
            }

            public String getCreatedAt() {
                return createdAt;
            }

            public void setCreatedAt(String createdAt) {
                this.createdAt = createdAt;
            }

            public boolean isIsSub() {
                return isSub;
            }

            public void setIsSub(boolean isSub) {
                this.isSub = isSub;
            }

            public boolean isIsTeacher() {
                return isTeacher;
            }

            public void setIsTeacher(boolean isTeacher) {
                this.isTeacher = isTeacher;
            }

            public int getLevel() {
                return level;
            }

            public void setLevel(int level) {
                this.level = level;
            }

            public String getOpenid() {
                return openid;
            }

            public void setOpenid(String openid) {
                this.openid = openid;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public int getRelation() {
                return relation;
            }

            public void setRelation(int relation) {
                this.relation = relation;
            }

            public int getScore() {
                return score;
            }

            public void setScore(int score) {
                this.score = score;
            }

            public int getSex() {
                return sex;
            }

            public void setSex(int sex) {
                this.sex = sex;
            }

            public WxUserInfoBean getWxUserInfo() {
                return wxUserInfo;
            }

            public void setWxUserInfo(WxUserInfoBean wxUserInfo) {
                this.wxUserInfo = wxUserInfo;
            }
            public String getHeadimgurl() {
                if (TextUtils.isEmpty(headimgurl)) {
                    if (wxUserInfo != null) {
                        headimgurl =  wxUserInfo.getHeadimgurl();
                    }
                }
                if (TextUtils.isEmpty(headimgurl)) {
                    headimgurl =  "";
                }
                return headimgurl;
            }

            public void setHeadimgurl(String headimgurl) {
                this.headimgurl = headimgurl;
            }

            public String getNickname() {
                if (TextUtils.isEmpty(nickname)) {
                    if (wxUserInfo != null) {
                        nickname =  wxUserInfo.getNickname();
                    }
                }
                if (TextUtils.isEmpty(nickname)) {
                    nickname =  C.DEFAULT_TEACHER_NAME;
                }
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }
            public static class WxUserInfoBean {
                /**
                 * openid : ohHipvzbJn7nBhTdLFJv80PQV5N0
                 * nickname : 逆风飞行
                 * sex : 1
                 * city : east
                 * province : Tianjin
                 * country : China
                 * headimgurl : http://wx.qlogo.cn/mmopen/PiajxSqBRaEKwicqNsJNPKbRDyzav5vlDPqiaYUboVWfhicCGvOrdGtrB7xT3d6VLjicFibK9iaVeSmndyVqwWogdKNsw/0
                 * updatedAt : 2016-10-24T05:47:12.000Z
                 */

                private String openid;
                private String nickname;
                private int sex;
                private String city;
                private String province;
                private String country;
                private String headimgurl;
                private String updatedAt;

                public String getOpenid() {
                    return openid;
                }

                public void setOpenid(String openid) {
                    this.openid = openid;
                }

                public String getNickname() {
                    return nickname;
                }

                public void setNickname(String nickname) {
                    this.nickname = nickname;
                }

                public int getSex() {
                    return sex;
                }

                public void setSex(int sex) {
                    this.sex = sex;
                }

                public String getCity() {
                    return city;
                }

                public void setCity(String city) {
                    this.city = city;
                }

                public String getProvince() {
                    return province;
                }

                public void setProvince(String province) {
                    this.province = province;
                }

                public String getCountry() {
                    return country;
                }

                public void setCountry(String country) {
                    this.country = country;
                }

                public String getHeadimgurl() {
                    return headimgurl;
                }

                public void setHeadimgurl(String headimgurl) {
                    this.headimgurl = headimgurl;
                }

                public String getUpdatedAt() {
                    return updatedAt;
                }

                public void setUpdatedAt(String updatedAt) {
                    this.updatedAt = updatedAt;
                }
            }
        }
    }
}
